<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox"
	xmlns:p="http://primefaces.org/ui">
	
	<ui:decorate template="/layout/input/editable-template.xhtml">
		<!-- 第一行 -->
		<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
			<ui:param name="compType" value="single" />
			<ui:param name="compBean1Id" value="templateFullName" />
			<ui:param name="compBean1Lable" value="模板显示名称：" />
			
			<ui:define name="compBean1Content">
				<h:inputText id="#{compBean1Id}" styleClass="{required:true}" value="#{partViewBean.searchTemplate.templateFullName}"  readonly="true"/>
			</ui:define>			
		</ui:decorate>		 
			
		<!-- 第二行 -->
		<ui:decorate template="/layout/input/editable-2c-custom-template.xhtml">
				<ui:param name="compType" value="normal" />
				<ui:param name="compBean1Id" value="pageURI" />
				<ui:param name="compBean2Id" value="uploadsearchfile" />
				<ui:param name="compBean1Editable" value="false"/>
				<ui:param name="compBean2Editable" value="false"/>
				<ui:param name="compBean1Lable" value="模板文件：" />
				<ui:param name="compBean2Lable" value="" />				
				<ui:define name="compBean1Content">
					<h:inputText id="#{compBean1Id}"  value="#{partViewBean.searchTemplate.pageURI}" readonly="true" />
				</ui:define>
				<ui:define name="compBean2Content">
					<p:fileUpload
					  id="#{compBean2Id}"
						fileUploadListener="#{documentManageAction.uploadSearchTemplateAction}" mode="advanced"
						sizeLimit="1000000" allowTypes="xhtml" description="只允许上传后缀名为xhtml的文件" label="上传"
						update="#{compId}_form:#{compBean1Id}">
						<h:inputHidden value="#{compId}" />
						<h:inputHidden value="#{partViewBean.id}" />
					</p:fileUpload>
				</ui:define>
			</ui:decorate> 
		
	</ui:decorate>
	<table>
			<tr>
				<td><p:commandButton title="删除上传文件" value="删除上传文件"
			actionListener="#{documentManageAction.deleteSearchTemplateAction}"
			update="#{compId}_form:pageURI"
			>
			<h:inputHidden value="#{compId}" />
			<h:inputHidden value="#{partViewBean.id}" />
		</p:commandButton></td>
			</tr>
		</table>
		  
</ui:composition>